<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>hello vue组件-全局组件</title>
    <link rel="stylesheet" type="text/css" href="./lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="./css/vue2-animate.css" type="text/css">

    <script type="text/javascript" src="./lib/vue/vue.js"></script>
    <script type="text/javascript" src="./lib/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="./lib/bootstrap/js/bootstrap.js"></script>
    <style>

    </style>
</head>

<body>
    <div class="container" id="box">
        <ul>定义组件的三种方式：
            <li>全局组件
                <code>
                        Vue.extend({
                            template: 'hello vue'
                        });
                </code>
            </li>
            <li>局部组件 存在于其他组件内部

            </li>
            <li></li>
        </ul>
        <aokser></aokser>
    </div>


</body>


<script>
    var aokser = Vue.extend({
        template: '<h3>我是h3</h3>'
    });

    Vue.component('aokser', aokser);

    var v = new Vue({
        el: '#box'
    });
</script>

</html>